home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / bob_espo.swf / scripts / __Packages / StartPopUp.as < prev    next >
Encoding:
Text File  |  2013-04-24  |  1.5 KB  |  60 lines

  1. class StartPopUp extends PopUp
  2. {
  3.    var sState;
  4.    var mcRef;
  5.    function StartPopUp(_mcRef)
  6.    {
  7.       super(_mcRef);
  8.    }
  9.    function doShow()
  10.    {
  11.       var _loc3_ = this.sState;
  12.       super.doShow();
  13.       if(_loc3_ == PopUp.sSTATE_IDLE)
  14.       {
  15.          Controller.getRef().pauseGame();
  16.       }
  17.    }
  18.    function doInstantShow()
  19.    {
  20.       var _loc3_ = this.sState;
  21.       super.doInstantShow();
  22.       if(_loc3_ == PopUp.sSTATE_IDLE)
  23.       {
  24.          Controller.getRef().pauseGame();
  25.       }
  26.    }
  27.    function doHide()
  28.    {
  29.       var _loc3_ = this.sState;
  30.       var _loc4_ = this.mcRef.mcState.mcPanel.mcSongs._currentframe;
  31.       super.doHide();
  32.       if(_loc3_ == PopUp.sSTATE_OPENED)
  33.       {
  34.          this.mcRef.mcState.mcPanel.mcSongs.gotoAndPlay(_loc4_);
  35.          Controller.getRef().unPauseGame();
  36.          CTRLGame.getRef().Screen.getInterface().doShow();
  37.       }
  38.    }
  39.    function doInstantHide()
  40.    {
  41.       var _loc3_ = this.sState;
  42.       super.doInstantHide();
  43.       if(_loc3_ == PopUp.sSTATE_OPENED)
  44.       {
  45.          Controller.getRef().unPauseGame();
  46.          CTRLGame.getRef().Screen.getInterface().doShow();
  47.       }
  48.    }
  49.    function clickStartButton()
  50.    {
  51.       Controller.getRef().playClickSound();
  52.       this.doHide();
  53.    }
  54.    function initPopUp()
  55.    {
  56.       this.mcRef.mcState.mcPanel.btnStart.onRollOver = Delegate.create(Main.getRef(),Main.getRef().rollOverButton);
  57.       this.mcRef.mcState.mcPanel.btnStart.onRelease = Delegate.create(this,this.clickStartButton);
  58.    }
  59. }
  60.